Recite the specific dua "Allahumma la tu'akhithni bima yaqulun…" when being praised.
If the praise is based on knowledge and piety, thank Allah and find joy in the existence of these attributes.
If the praise is based on wealth or status (illusory), stop the person or leave the conversation.
When Praising Others
Avoid praising the attributes of others unless they recognize the true bestower of those attributes (Allah); as such, it won't increase the person's self-admiration and pride.
Only praise others if it will benefit their realization of this truth.
Avoid exaggeration, insincere affection, speculative statements, and pleasing a wrongdoer.